package com.cskaoyan.javase.oop1._7game._0lol;

/**
 * 用面向对象的思想模拟LOL当中盖伦的战斗
 * 对象描述的是程序世界中的个体/实体，所以一般都是名词。
 * 抽取出全体对象的共性特征，也就是成员变量和方法，就可以定义一个类。
 *
 * 盖伦是一个对象,类就是英雄类(Legend)
 *
 * @since 10:54
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        Legend galen = new Legend("galen", 500, 0, "沉默", "护盾", "转圈圈", "大宝剑", 1, "人在塔下!");
        galen.fight();
    }
}

class Legend {
    // 属性
    String name;
    int hp;
    int mp;
    String skillQ;
    String skillW;
    String skillE;
    String skillR;
    int level;
    String slogan;

    // 行为
    public void fight() {
        System.out.println("名字为" + name + "的英雄,正在" + slogan);
    }

    public Legend() {
    }

    public Legend(String name, int hp, int mp, String skillQ, String skillW, String skillE, String skillR, int level, String slogan) {
        this.name = name;
        this.hp = hp;
        this.mp = mp;
        this.skillQ = skillQ;
        this.skillW = skillW;
        this.skillE = skillE;
        this.skillR = skillR;
        this.level = level;
        this.slogan = slogan;
    }
}